﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SMS.Business.Stocks
{
    public class StockUsersBusiness: BusinessBase<SMS.DAL.StockUser,SMS.DAL.Providers.StockUserSearchCriteria>
    {
        SMS.DAL.Providers.StockUsersProvider Provider;

        public StockUsersBusiness()
        {
            Provider = new DAL.Providers.StockUsersProvider();
        }
        public override bool Insert(DAL.StockUser item)
        {
            Provider.Insert(item);
            return true;
        }

        public override bool Update(DAL.StockUser updatedItem)
        {
            Provider.Update(updatedItem);
            return true;
        }

        public override bool Delete(int id)
        {
            Provider.Delete(id);
            return true;
        }

        public  bool Delete(int Sid,int Uid)
        {
            Provider.Delete(Sid, Uid);
            return true;
        }

        public override DAL.StockUser GetByID(int id)
        {
            return Provider.GetByID(id);
        }

        public override List<DAL.StockUser> Search(DAL.Providers.StockUserSearchCriteria SearchCriteria)
        {
            return Provider.Search(SearchCriteria);
        }
    }
}
